<?php
class Videos extends DatabaseTable {

    public function __construct($conn) {
        parent::__construct($conn);
    }

    protected function load(){
        $videos_table="video_".$this->getLanguage()->getCode();
        $query=sprintf("SELECT * FROM 	%s",
            mysql_real_escape_string($videos_table));
	$result=mysql_query($query,$this->conn);
	if ($result){
            while ($row = mysql_fetch_assoc($result)) {
                $id=$row['id'];
                $name=$row['name'];
                $url=$row['url'];
                $url_mobile=$row['url_mobile'];
                $code=$row['code'];
                $video=new Video();
                $video->setId($id);
                $video->setUrl($url);
                $video->setUrlMobile($url_mobile);
                $video->setCode($code);
                $this->records[$id] = $video;
            }
        }
	mysql_free_result($result);
    }
}
?>
